﻿namespace EFS.RC.CC.Messages.HuntQueue
{
	/// Class Status
	public class Status : EFS.Common.Serialization.ISerializable
	{
		/// Property SIP: Get, Set
		public System.String PhoneUri;

		/// Property WiatCount: Get, Set
		public System.Int32 WaitCount;

		/// Property LongestWatingTime: Get, Set
		public System.Int64 LongestWatingTime;

		/// Property AverageWatingTime: Get, Set
		public System.Int64 AverageWatingTime;

		/// Total calles
		public System.Int32 TotalCalls;

		/// Dropped callers
		public System.Int32 TotalDroppedCalls;

		/// Total allocated calls
		public System.Int32 TotalAcceptedCalls;

		/// Serialize
		public void Serialize(EFS.Common.Serialization.XmlWriter xmlWriter)
		{
			// write
			xmlWriter.Write("PhoneUri", PhoneUri);
			xmlWriter.Write("WaitCount", WaitCount);
			xmlWriter.Write("LongestWatingTime", LongestWatingTime);
			xmlWriter.Write("AverageWatingTime", AverageWatingTime);
			xmlWriter.Write("TotalCalls", TotalCalls);
			xmlWriter.Write("TotalDroppedCalls", TotalDroppedCalls);
			xmlWriter.Write("TotalAcceptedCalls", TotalAcceptedCalls);
		}

		/// Deserialize
		public void Deserialize(EFS.Common.Serialization.XmlReader xmlReader)
		{
			// read
			xmlReader.Read("PhoneUri", ref  PhoneUri);
			xmlReader.Read("WaitCount", ref  WaitCount);
			xmlReader.Read("LongestWatingTime", ref  LongestWatingTime);
			xmlReader.Read("AverageWatingTime", ref  AverageWatingTime);
			xmlReader.Read("TotalCalls", ref  TotalCalls);
			xmlReader.Read("TotalDroppedCalls", ref  TotalDroppedCalls);
			xmlReader.Read("TotalAcceptedCalls", ref  TotalAcceptedCalls);
		}
	}
}